from common.connect_db import MyDB

my_db = MyDB()


class DataBaseCar:

	@staticmethod
	def get_display_car_model():
		"""
		查所有上架的车型
		"""
		sql = "select * from life_car_models where status = 1"
		result = my_db.execute_select('car', sql)
		if len(result) == 1:
			return result[0]
		else:
			raise ValueError('查询不到上架的车型！')


if __name__ == '__main__':
	print(DataBaseCar.get_display_car_model())
